import sys
from logger import logger
from PySide6 import QtWidgets
from store.login import Login
from widget.login import LoginWidget
from widget.main import MainWidget

class App(QtWidgets.QApplication):
    def __init__(self, sys_argv):
        super().__init__(sys_argv)
        self.main_widget = MainWidget(self)
        self.login = Login()
        self.login_widget = LoginWidget(self)
        self.login_widget.show()
    
    def main_show(self):
        self.main_widget.show()
        self.login_widget.close()
        logger.info('main show')
    
    def login_show(self):
        self.login_widget.show()
        self.main_widget.close()
        logger.info('login show')

if __name__ == "__main__":
    app = App(sys.argv)
    sys.exit(app.exec())